# # _*_coding:utf-8_*_
# __author__ = 'gerry'
# import copy
#
# menu = {
#     'Beijing': {
#         "Chaoyang": {
#             "CBD": ['CICC', 'CCTV'],
#             "JinRong": [""],
#             "Wangjing": ["Momo", "ChuiZI"]
#         },
#         "Haidian": ["Baidu", "YouKu"]
#     },
#
#     'Shanghai': {
#         "PuDong": ['Ctrip', "1 shop"],
#         "Puxi": ["China Bank", "America Bank"]
#
#     },
#     'SD': 'SB'
# }
#
# # for k, v in menu.items():  # small dict
# #     print k, v
# #
# # for key in menu:
# #     for key1 in menu[key]:
# #         print menu[key][key1]
#
#
#
# dict1 = {1: 2, 2: 3, 3: 4}
# dict2 = {1: 'test', 5: 6}
#
# dict1.update(dict2)
# print "---->", cmp(dict1, dict2)
#
# menu2 = copy.deepcopy(menu)
# menu["Beijing"]["Haidian"][1] = 'google'
#
# print id(menu["Beijing"]["Haidian"][1])
# print id(menu2["Beijing"]["Haidian"][1])
#
#
#
# data = {}
# for i in range(100):data[i] = i
# data["t"] = "t"
# print data
# data.popitem()
# data.popitem()
# data.popitem()
# data.popitem()
# data.popitem()
# data.pop("t")
# print data.keys()
#
#
#
#
#
#
#
#
#
#
#
#
#

py9 = [1, 2, 3, 5, 6, 2, 9]
py10 = [2, 1, 3, 5, 7]

py9 = set(py9)  # duplicate removal
py10 = set(py10)

print py10 & py9  # insersection
print py9 | py10  # union
print py9 - py10 #difference set
print py10 ^ py9 # symmetric difference set
print py9.issubset(py10) #a is b'subset  or not
print py10.issuperset(py9) #a contains b or not

